package com.web44.spring.web;

import com.web44.spring.service.IUserBookAllService;
import com.web44.spring.service.IUserBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * @Title: UserBookController
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2024/1/10 14:54
 */
@Controller
public class UserBookController {

    @Autowired
    private IUserBookService userBookService;
    @Autowired
    private IUserBookAllService userBookAllService;

    public void buy(int userId, int bookId) {
        userBookService.buy(userId,bookId);
    }

    public void buyAll(List<Integer> userIds, int bookId) {
        userBookAllService.buyAll(userIds,bookId);
    }

}
